<?php

use think\migration\Migrator;
use think\migration\db\Column;

class CreateJpushHistory extends Migrator
{
    public function up(){
        $table = $this->table('jpush_history',['comment'=>'极光推送历史表']);
//        $table->addColumn('user_id','integer',['limit'=>10,'comment'=>'用户id'])
//            ->addForeignKey('user_id', 'user', 'id', ['delete'=> 'CASCADE'])
//            ->addColumn('content','text',['comment'=>'推送内容'])
//            ->addColumn('receiver','text',['comment'=>'receiver消息标识'])
//            ->addColumn('platform','text',['comment'=>'推送平台'])
//            ->addColumn('msg_type','integer',['comment'=>'消息类型 0 系统消息 1好友请求 2计划提醒'])
//            ->addColumn('create_time','datetime',['comment'=>'创建时间'])
//            ->create();
    }
    public function down(){
        $this->dropTable('jpush_history');
    }
}
